﻿using Common.DataModels;

namespace PLC.Domain.Dto
{
    public class DtoProductionData
    {
        public long Id { get; set; }
        /// <summary>
        /// 任务编号
        /// </summary>
        public string TaskCode { get;  set; }
        /// <summary>
        /// 上端板编号
        /// </summary>
        public string UpperEndPlateCode { get;  set; }
        /// <summary>
        /// 下端板编号
        /// </summary>
        public string LowerEndPlateCode { get;  set; }
        /// <summary>
        /// 设备id
        /// </summary>
        public long DeviceId { get;  set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public int DeviceType { get; set; }
        /// <summary>
        /// 结果值(0 没有结果  1 ok 2 ng)
        /// </summary>
        public int Result { get;  set; }
        /// <summary>
        /// json格式的数据
        /// </summary>
        public string Data { get;  set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        public DtoProductionData SetDeviceType(int deviceType)
        {
            this.DeviceType = deviceType;
            return this;
        }
    }

    public enum EnumDtoDeviceType
    {
        气密=1,
        返修=2
    }
}
